package high.concurrent.feign;

import high.concurrent.request.LockCouponRecordRequest;
import high.concurrent.utils.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "coupon")
public interface CouponFeignService {

    @GetMapping("/api/coupon_record/v1/getCouponRecordDetail")
    JsonData getCouponRecordDetail(@RequestParam(value = "coupon_record_id") Long couponRrecordId);


    /**
     * 下单锁定优惠券
     * @param lockCouponRecordRequest
     * @return
     */
    @PostMapping("/api/coupon_record/v1/lockCouponRecord")
    JsonData lockCouponRecord(@RequestBody LockCouponRecordRequest lockCouponRecordRequest);
}
